Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
roborev: Combined Review (
|
ssh.RemoteSync namespaces sessions (Machine, IDPrefix) and the remote skip cache by host alone, so two remote_hosts entries sharing a host collide regardless of user/port: they thrash each other's skip cache each run and share the host~ session ID namespace. Reject duplicate host values in ValidateRemoteHosts instead of silently sharing or overwriting cached state. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
roborev: Combined Review (
|
runLocalSync returns whether a full resync ran (--full or an automatic data-version resync). doSync discarded it and always passed cfg.Full to the remote fan-out. Propagate it: a local resync now forces every configured remote full too, so remote sessions are re-parsed rather than skipped via the remote skip cache. This is correct-by-construction rather than a live fix: a resync swaps in a fresh DB whose remote_skipped_files table starts empty, so remotes already re-process fully today. Propagating the signal keeps that correct if the remote skip cache is ever preserved across a resync, and matches how pg_watch/usage/main already branch on NeedsResync. Extracts syncLocalAndRemotes as an injectable seam and tests that an automatic resync propagates full=true to every configured host. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
roborev: Combined Review (
|
Remote sync shells out to ssh with no options, so an unattended run could stall on a password/passphrase or host-key prompt, or slow-fail on an unreachable host -- and config-driven fan-out lets one bad host drag down the rest. Pass BatchMode=yes (never prompt; require key-based auth) and ConnectTimeout so runs fail fast with a clear error instead. Defaults follow any caller sshOpts so an explicit override still wins. Applies to both sync --host and the configured fan-out; host-key checking is left to the user's ssh config (unchanged). Document the key-based (passwordless) SSH requirement in sync and root help. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
roborev: Combined Review (
|
Closes #533.
Adds a
[[remote_hosts]]array toconfig.tomlsoagentsview synccan syncfrom a small fleet of machines without a per-host cron/launchd job.
Behavior:
agentsview syncwith no--hostruns the local sync, then syncs eachconfigured host over SSH in declared order.
--fullapplies to every sync inthe run, and an automatic data-version resync forces every configured remote
full too (so remote sessions are re-parsed, not skipped).
agentsview sync --host Xis unchanged: it ignoresremote_hostsand syncsonly that host, failing fast on error.
in a stderr summary; the remaining hosts still run, and the command exits
non-zero if any configured host failed.
remote_hostsconfig fails before any sync: each entry needs anon-empty host, a port in 0..65535, and a host unique within the list (remote
sync namespaces sessions and the skip cache by host, so duplicates would
collide). This check runs only on the no-
--hostpath, so a bad entry cannotaffect
sync --host X. Host/user values are trimmed at load so the validatedvalue matches what is passed to ssh.
Remote sync runs ssh non-interactively (
BatchMode=yesplus a boundedConnectTimeout) so an unattended run fails fast instead of stalling on aprompt or an unreachable host. It requires key-based (passwordless) SSH and
never prompts for a password; this applies to
sync --hostas well. Host-keychecking is left to the user's ssh config.
sync --helpand the root help document the config block and the key-authrequirement.
RemoteHostsis config-file/CLI only (json:"-"); it is not exposed to thesettings API, so there is no web-UI editing of the host list.